package com.clp.util.hutool.core.lang;

import com.clp.util.hutool.core.util.ReUtil;

import java.util.regex.Pattern;

public class Validator {
    public static final Pattern IPV4 = PatternPool.IPV4;

    public static boolean isIpv4(CharSequence value) {
        return isMatchRegex(IPV4, value);
    }

    public static boolean isMatchRegex(Pattern pattern, CharSequence value) {
        return ReUtil.isMatch(pattern, value);
    }
}
